//---------------------------------------------------------------------------
#ifndef DPCnsBncH
#define DPCnsBncH

//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "DialPad.h"
#include "PHDS.h"
#include <ExtCtrls.hpp>
#include <Buttons.hpp>
#include "PHEdit.h"
#include "PHLabel.h"
#include "PHGridEd.h"
#include <Grids.hpp>
#include "PHSpdBut.h"
#include "DIALPAD.h"
#include "PHSPDBUT.h"

//---------------------------------------------------------------------------
class TDPCnsBnc1 : public TDiPad
{
__published:  // IDE-managed Components
  TBitBtn*  BitBtn1;
  TBitBtn*  BitBtn3;
  PHLabel*  PHLabel2;
  PHEdit*  PHEdit2;
  PHLabel*  PHLabel3;
  PHEdit*  PHEdit3;
  PHGridEdit*  PHGridEdit1;
  PHDataSource*  DSBancos;
  PHLabel*  PHLabel1;
  PHEdit*  PHEdit1;
  PHSpeedButton*  PHSpeedButton1;
  PHEdit*  PHEdit4;
  TBitBtn*  BitBtn2;
  PHEdit*  PHEdit5;
  void __fastcall BitBtn3Click( TObject* Sender );
  void __fastcall DSBancosAfterOpen( TObject* Sender );
  void __fastcall BitBtn1Click( TObject* Sender );
  void __fastcall PHEdit1Change( TObject* Sender );
  void __fastcall PHEdit2Change( TObject* Sender );
  void __fastcall PHEdit3Change( TObject* Sender );
  void __fastcall PHGridEdit1DrawGridCell( int Row, int Col, TColor&  CorTexto, TColor&  CorFundo,
                                           bool&  AplicarCoresSelecao, PHDataSource*  PHDS,
                                           AnsiString&  Conteudo );
  void __fastcall FormShow( TObject* Sender );
  void __fastcall PHGridEdit1DblClick( TObject* Sender );
  void __fastcall FormClose( TObject* Sender, TCloseAction& Action );
  void __fastcall PHGridEdit1KeyDown( TObject* Sender, WORD& Key, TShiftState Shift );

private: // User declarations
  void __fastcall LimpaGrid(void);
  void __fastcall Processamento(TObject* Sender);
  void __fastcall ProcRecebimentos(void);
  void __fastcall ProcPagamentos(void);
  void __fastcall ProcSaldos(double SaldoAtual);
  void __fastcall InsereSaldoConta(int Data);

  UINT DataSaldo;
  UINT DataInsercao;
  bool SaldoInserido;
  double SaldoAnterior;
  bool RecebeuSaldo;
  double Saldo;
  AnsiString StatusSaldo;
  UINT DataSaldoAnterior;
  AnsiString GE;

public:  // User declarations
  __fastcall TDPCnsBnc1( TComponent* Owner );

  struct MVBCO* Bco;
  bool Alterar;
  char TipoAlterar;
  int CodigoAlterar;
};

//---------------------------------------------------------------------------
extern PACKAGE TDPCnsBnc1*  DPCnsBnc1;

//---------------------------------------------------------------------------
#endif

